<?php
$pathinfo = pathinfo(__FILE__);
preg_match('/.+(?=wp-content)/', $pathinfo['dirname'], $match);
$pathNeeded = preg_replace('/\ /', '/', $match[0]);
require_once($pathNeeded . 'wp-load.php'); //refer to wp-load to use instruction

$email = $_REQUEST['email'];
$pass  = $_REQUEST['pass'];

//echo 'email :'.$email." @@ pass".$pass;
$data['username']= $email; 
$data['password'] = $pass;

$login = User::get_user_buy_username_password($data);
if($login == 0)
{
    echo '<spass class="error_info" > User or Password is wrong</span><br/>';
}
else if($login == -1)
{
     echo '<spass class="error_info" >You active is not actived.</span><br/>';
}
 else {
     echo '<span style="color:green;">Login is sucessfull</span>';    
}